package com.hy.demo;

import com.hy.demo.learn.spring.model.Person;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(DemoApplication.class, args);
        Person p = context.getBean(Person.class);
        System.out.println(p.getName());

        p.getPet().move();
    }

}
